package item3_10.src.com.company;

public class Gouzao {
	
	{
		System.out.println("这是构造代码块");
	}
	
	public Gouzao() {
		System.out.println("这是无参构造");
	}
	
	public Gouzao(String a) {
		System.out.println("这是有参构造");
	}
	
	public static void main(String[] args) {
		//Gouzao g1 = new Gouzao("a");
		Gouzao c = new Child();
	}

}

class Child extends Gouzao {
	{
		System.out.println("子类构造代码块");
	}
	
	public Child() {
//		super();
		System.out.println("子类无参构造");
	}
	
	public Child(String a) {
		super(a);
		System.out.println("子类有参构造");
	}
}
